package com.zhangshitong.springbootModel.base;

import java.io.Serializable;
import java.util.List;

import com.github.pagehelper.ISelect;
import com.github.pagehelper.PageHelper;

/**
 * 分页
 * 这个page在这里只用到了，currentPage 和 pageSize，是用在了插件PageHelper的startPage里面
 * PageHelper.startPage(page.getCurrentPage(), page.getPageSize()).doSelectPage(new ISelect()
 * 其实完全可以不用这个Page类，直接在startPage里面传int page和int limit即可
 * @author Administrator
 *
 */
public class Page<T> implements Serializable {

	private static final long serialVersionUID = 1L;
	private int pageSize=10;    //页面大小(默认10)  
    private int currentPage=1;  //当前页面(默认1)  
    private long totalCount;     //总记录数
    private int totalPage;      //总页数
    private List<T> list;       //每页显示数据记录的集合
    public int getPageSize() {  
        return pageSize;  
    }  
    public void setPageSize(int pageSize) {  
        this.pageSize = pageSize;  
    }  
    public int getCurrentPage() {  
        return currentPage;  
    }  
    public void setCurrentPage(int currentPage) {  
        this.currentPage = currentPage;  
    }  
    public long getTotalCount() {  
        return totalCount;  
    }  
  
    public int getTotalPage() {  
        return totalPage;  
    }
	public List<T> getList() {
		return list;
	}
	public void setTotalCount(long totalCount) {
		this.totalCount = totalCount;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	public void setList(List<T> list) {
		this.list = list;
	}  
}
